{template admin/header}

<script src="./js/date/WdatePicker.js" type="text/javascript"></script>
<script src="./js/topicManage.js" type="text/javascript"></script>

	<form action="nanbo.php" method="get" name="on_off">
		<input type="hidden" name="mod" value="reward">
		<input type="hidden" name="code" value="on_off">
		<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
			<tr class="header">
				<td colspan="2">有奖转发开关</td>
			</tr>
			
			<tr>
			<td class="altbg1" width="150">开关：</td>
			<td class="altbg2">
			  <input name="reward_on_off" type="radio"  value="1" {if $this->Config['reward_open']}checked="checked"{/if}>开启		
			  <input name="reward_on_off" type="radio"  value="0" {if !$this->Config['reward_open']}checked="checked"{/if}>关闭		
			  <input type="submit" class="button" value="提交" >		
			</td>
			</tr>
		</table>
	</form>
	<form action="nanbo.php" method="get" name="search">
	<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
		<tr class="header">
			<td colspan="2">搜索</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">ID:</td>
			<td class="altbg2">
			  <input name="id" type="text" id="id" value="{$id}" size="40">		
			</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">
			标题:
			</td>
			<td class="altbg2">
			<input type="text" name="title" value="{$title}" size="40">		
			</td>
		</tr>
		<tr>
		<td class="altbg1" width="150">昵称:</td>
			<td class="altbg2">
			<input type="text" name="nickname" value="{$nickname}" size="40" onkeyup="ajax_nickname(this,this.value);" autocomplete="off">		
			</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">
			时间:
			</td>
			<td class="altbg2">
		  	  <input type="text" id="timefrom" name="timefrom" value="{$timefrom}" readonly onFocus="WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true})"/>
			  &nbsp;&nbsp;至&nbsp;&nbsp;
			  <input type="text" id="timeto" name="timeto" value="{$timeto}" readonly onFocus="var fromt=document.getElementById('timefrom').value;WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd HH:mm',alwaysUseStartDate:true,minDate:fromt})"/>
			</td>
		</tr>
		<tr>
			<td class="altbg1" width="150">&nbsp;</td>
			<td class="altbg2">
			  <button name="do" value='' type="submit" class="button">搜索一下</button> &nbsp;
			  <button class="button" type="button" onclick="window.location.href='nanbo.php?mod=reward';return false;">全部活动</button>
			  <input name="mod" type="hidden" value="reward">
			</td>
		</tr>
		
	</table>
	</form>
	
	<form method="post" action="nanbo.php?mod=reward&code=delete">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
			<tr class="header">
				<td width="5%">
				  <label><input class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="checkall(this.form, 'ids')" >删除</label>
				</td>
				<td width="30%">标题</td>
				<td width="10%">发起者</td>
				<td width="10%">转发数</td>
				<td width="10%">开始/结束时间</td>
				<td width="5%">推荐</td>
				<td width="20%">操作</td>
			</tr>
			<!--{if $count}-->
				<!--{loop $reward_list $value}-->
				<tr class="altbg2" onmouseover="this.className='altbg1'" onmouseout="this.className='altbg2'">
					<td style="border-bottom:1px dotted #EDEDED"><input class="checkbox" type="checkbox" name="ids[]" value="$value['id']" ></td>
					<td style="border-bottom:1px dotted #EDEDED">
					  <a href="index.php?mod=reward&code=detail&id={$value['id']}" target="_blank">{$value['title']}</a>
					  <input type="hidden" name="vid[]" value="$value['id']" >
					</td>
					<td style="border-bottom:1px dotted #EDEDED"><a href="index.php?mod={$value['uid']}" target="_blank">{$value['nickname']}</a><br>[IP:{$value['postip']}]</td>
					<td style="border-bottom:1px dotted #EDEDED">{$value['f_num']}人</td>
					<td style="border-bottom:1px dotted #EDEDED">$value['from_time']<br>$value['to_time']</td>
					<td style="border-bottom:1px dotted #EDEDED" align="center">
					  <input class="checkbox" type="checkbox" name="up_id[]" value="$value['id']" {$value['recd_checked']}>
					</td>
					<td style="border-bottom:1px dotted #EDEDED">
					  <A href="nanbo.php?mod=reward&code=edit&id={$value['id']}">编辑</A>&nbsp;|&nbsp;
					  <A href="nanbo.php?mod=reward&code=delete&id={$value['id']}" onclick="return confirm('你确实要删除吗?不可恢复');">删除</A>&nbsp;|&nbsp;
		        	  <A href="javascript:void(0);" onclick="force_out('$value[uid]');">封杀此用户</A>
					</td>
				</tr>
				<!--{/loop}-->
				<!--{if $page_arr[html]}-->
				<tr align="center">
					<td colspan="7" class="altbg1">
					{$page_arr[html]}
					</td>
				</tr>
				<!--{/if}-->
			<!--{else}-->
				<tr align="center">
					<td colspan="8">
						还没有有奖转发记录
					</td>
				</tr>
			<!--{/if}-->
		</table>
	
		<center><input class="button" type="submit" name="cronssubmit" value="提 交"></center>
	</form>